import request from '@/axios'
import type { UserType } from './types'

export const loginApi = (data: UserType): Promise<IResponse<any>> => {
  return request.post({ url: '/login', data })
}

export const loginOutApi = (): Promise<IResponse> => {
  return request.get({ url: '/logout' })
}

export const getAdminRoleApi = (
): Promise<IResponse<AppCustomRouteRecordRaw[]>> => {
  return request.get({ url: '/menu/getRoutes' })
}

export const getTestRoleApi = (): Promise<IResponse<string[]>> => {
  return request.get({ url: '/mock/role/list2' })
}
